{include file="pageheader.htm"}

<script src="js/utils.js" ></script>

{if $ErrMsg }
<div class="list-div" id="err_msg" >
<table cellpadding="3" cellspacing="1">

  <tr>
    <td align="center" width="80%" >{$ErrMsg} </td>
    <td align="right"><input type="button" onclick="hide('err_msg');" value="{$lang.close}" ></td>
  <tr> 
   
</table>
</div>

{/if}



<form method="post" action="?page=activity&action=save{if $activity.id}&id={$activity.id}{/if}" name="theForm" >

<!-- bof condition -->

<div class="list-div" id="activity_condition" >
<table cellpadding="3" cellspacing="1">

  <tr>
    <th colspan=4 >{$lang.condition_option}</th>
  <tr>

  <tr>
  <td>{$lang.if_cycled_order}</td>
  <td colspan=3>{html_radios name="cycled" options=$option_yesno selected=$activity.cycled}</td>
  </tr>

   <tr>
  <td>{$lang.if_adsense }</td>
  <td colspan=3>{html_radios name="adsense" options=$option_yesno selected=$activity.adsense}</td>
  </tr>


  <tr>
  <td>{$lang.language}</td>
  <td colspan=3>{html_checkboxes name="lang" values=$options_language_names output=$options_language_names selected=$activity.limited_langs}</td>
  </tr>

  <tr>
  <td>{$lang.customer}</td>
  <td colspan=3>{html_checkboxes name="customerlevel" options=$options_customer_level  selected=$activity.customerlevel}</td>
  </tr>

<tr>
  <td>{$lang.label_payment}</td>
  <td colspan=3>{html_checkboxes name="payment" options=$options_payment  selected=$activity.payment}</td>
  </tr>


  <tr>

  <td>{$lang.total_min }</td>
  <td><input type="text" name="total_min" value="{$activity.limited_price.min}" ></td>

  <td>{$lang.total_max }</td>
  <td><input type="text" name="total_max" value="{$activity.limited_price.max}" ></td>  
  </tr>
 
   <tr>

  <td>{$lang.limit_products }</td>
  <td colspan=3 ><input type="text" name="limit_products" value="{$activity.limit_products}" ></td> 
  </tr>
  
  <tr>
   <!-- time -->
  <td>{$lang.activity_begintime }</td>
  <td>
  	<input type="text" id="idmintime" name="mintime" size="15" value="{$activity.begindate}" onclick="return showCalendar('idmintime', '%Y-%m-%d', false, false, 'idmintime');" />
  	
   
  <td>{$lang.activity_endtime }</td>
  <td>
  	<input type="text" id="idmaxtime" name="maxtime" size="15" value="{$activity.enddate}" onclick="return showCalendar('idmaxtime', '%Y-%m-%d', false, false, 'idmaxtime');" /> 
   </td>  
  </tr> 

</table>
</div>

<!-- eof conditon -->


<!-- bof activity info -->
<br />

<div class="list-div" id="activity_params" >
<table cellpadding="3" cellspacing="1">

  <tr>  	
    <th>{$lang.activity_title}</th>
    <th>{$lang.activity_handle}</th>
 
    <th>{$lang.activity_status}</th>    
	 
  </tr>

  <tr>
    <td width="160px" ><input type=text value="{$activity.title}" name="title" /></td>
    <td width="220px"><input type=text value="{$activity.handle}" name="handle" /></td> 
    <td>{html_radios name="isvailable" options=$radios_activity_status checked=$activity.isAvailable} </td>    
	 
  </tr> 
  
  <tr> <td align=right >{$lang.activity_desc}</td>
  	
  	<td colspan=4 ><input type=text value="{$activity.description}" name="description"    /></td> 
	
   </tr>

</table>

<!-- eof fee info -->

</div>

<br >

<div class="list-div" id="activity_act" >
<table cellpadding="3" cellspacing="1">

  <tr>  	
    <th colspan=2 >{$lang.activity_act}</th>
  </tr>

   
  <tr>
  	<td>{$lang.act_script} </td>
    <td>
	<textarea name="act_script" rows="5" cols="60">{$activity.act_script}</textarea> </td>    
  </tr>
  
  
  <tr>
  
  <td  align=center > <input type=submit value={$lang.submit} /></td>
  <td align=right > &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;<a href="?page=fee" >{$lang.return_activity_list}</a></td>
  </tr>											 

</table>

<!-- eof fee info -->

</div>
</form>




<!-- bof help -->
<br />

<div class="list-div" id="fee_params" >
<table cellpadding="3" cellspacing="1">
  <tr><th>{$lang.label_help}</th></tr>

  <tr>
    <td>
    	{$lang.help_condition }<br />
    	{$lang.help_activity}
    	
    </td>  
  </tr>
</table>
</div>
<!-- eof help -->

<script type="text/javascript" >
{literal}
	function hide(divname) {		
		$("#"+divname).hide();		
	}
{/literal}	
	
</script>

{include file="pagefooter.htm"}